binary search in design and analysis of algorithms